import request from '../utils/request';
import { remoteAddress } from './ip';

export async function addSchedule(params) {
  return request(remoteAddress('/teacher/course/add'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function deleteSchedule(params) {
  return request(remoteAddress('/teacher/course/delete'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function editSchedule(params) {
  return request(remoteAddress('/teacher/course/update'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function querySchedule(params) {
  return request(remoteAddress('/teacher/course/listall'), {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function getUserSchedule(params) {
    return request(remoteAddress('/teacher/course/get'), {
      method: 'POST',
      body: {
        ...params,
      },
    });
}